<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

require dirname(__FILE__).'/pc_controller.php';

class Customer_rental extends PC_controller {

    public function __construct(){
        parent::__construct();
        $this->load->model('Customermodel','m_customer',true);
    }

    public function index(){
        $data = parent::index();

        global $g_rental_devices;
        $data['attr'] = array();
        $data['attr']['rental_devices'] = $g_rental_devices;

        $this->load->view('admin/customer_rental',$data);
    }


    public function getCustomerRentalList() {
      $assist['where'] = getFilter($this->input->post(),Customermodel::$searchField);
      $assist['like'] = getFilter($this->input->post(),Customermodel::$likeField);
      $assist['sort'] = getSort($this->input->post(),Customermodel::$sortField);
      $assist['pagination'] = getPagination($this->input->post());

      list($list,$count) = $this->m_customer->getCustomerRentalListSection($assist);

      $this->response->setSuccess();
      $this->response->setItems($list);
      $this->response->setTotalCount($count);
      $this->response->responseExit();
    }



}
/* End of file api_log.php */
/* Location: ./application/controllers/customer_rental.php */
